package com.ruoyi.union.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.union.domain.SysActivityRegistration;
import org.apache.ibatis.annotations.Mapper;

/**
 * 活动报名Mapper接口
 * 
 * @author ruoyi
 * @date 2025-01-15
 */
@Mapper
public interface SysActivityRegistrationMapper extends BaseMapper<SysActivityRegistration>
{
    /**
     * 查询活动报名
     * 
     * @param registrationId 活动报名主键
     * @return 活动报名
     */
    public SysActivityRegistration selectSysActivityRegistrationByRegistrationId(Long registrationId);

    /**
     * 查询活动报名列表
     * 
     * @param sysActivityRegistration 活动报名
     * @return 活动报名集合
     */
    public List<SysActivityRegistration> selectSysActivityRegistrationList(SysActivityRegistration sysActivityRegistration);

    /**
     * 新增活动报名
     * 
     * @param sysActivityRegistration 活动报名
     * @return 结果
     */
    public int insertSysActivityRegistration(SysActivityRegistration sysActivityRegistration);

    /**
     * 修改活动报名
     * 
     * @param sysActivityRegistration 活动报名
     * @return 结果
     */
    public int updateSysActivityRegistration(SysActivityRegistration sysActivityRegistration);

    /**
     * 删除活动报名
     * 
     * @param registrationId 活动报名主键
     * @return 结果
     */
    public int deleteSysActivityRegistrationByRegistrationId(Long registrationId);

    /**
     * 批量删除活动报名
     * 
     * @param registrationIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSysActivityRegistrationByRegistrationIds(Long[] registrationIds);

    /**
     * 根据活动ID查询报名列表
     * 
     * @param activityId 活动ID
     * @return 报名列表
     */
    public List<SysActivityRegistration> selectSysActivityRegistrationByActivityId(Long activityId);

    /**
     * 根据会员ID查询报名列表
     * 
     * @param memberId 会员ID
     * @return 报名列表
     */
    public List<SysActivityRegistration> selectSysActivityRegistrationByMemberId(Long memberId);

    /**
     * 检查会员是否已报名该活动
     * 
     * @param activityId 活动ID
     * @param memberId 会员ID
     * @return 报名记录
     */
    public SysActivityRegistration checkRegistrationExists(Long activityId, Long memberId);

    /**
     * 根据活动ID和会员ID删除报名记录
     * 
     * @param activityId 活动ID
     * @param memberId 会员ID
     * @return 结果
     */
    public int deleteSysActivityRegistrationByActivityIdAndMemberId(Long activityId, Long memberId);
}
